Dynomotion

Group: DynoMotion Message: 9759 From: bwholt@bellsouth.net Date: 7/1/2014
Subject: KFLOP / KSTEP / MACH3 with PWM Spindle

Hello,


I'm having a bit of an issue getting my PWM controlled spindle to work properly.  I'm using KFLOP in conjunction with KSTEP boards and running MACH3.  I've attached screenshots of my setup in MACH3 and of the spindle and PWM controller I'm using.


My issue is that I can get a scaled voltage in the range of 0 to 5 VDC out of the PWM generator; however, the waveform looks nothing like a standard PWM waveform.  It almost looks sinusoidal.  The frequency of the waveform is correct per the setup in the example spindle file C:\KMotion432\C Programs\KStep\Mach3\SpindleMach3KStep.c.


I'm using KSTEP JP33 pin 6 as the PWM output.  I've connected an oscilloscope across pin 6 and pin 7 while supplying 5 VDC to pin 5.I can set a spindle speed in MACH3 and the voltage across pin 6-7 will scale accordingly.  Is the waveform supposed to be quasi-sinusoidal?  Have I configured my pins correctly?


BTW, I've also verified ground and signal isolation.


Any insight would be much appreciated.


Thanks

Wayne

  @@attachment@@
Group: DynoMotion Message: 9760 From: Tom Kerekes Date: 7/1/2014
Subject: Re: KFLOP / KSTEP / MACH3 with PWM Spindle [7 Attachments]
Hi Wayne,

The output should be a relatively constant DC level.

I don't know what you mean by: "I've also verified ground and signal isolation."

That might be the problem.  The circuit is isolated from KFLOP/KSTEP GND (see schematic below).  If you want to use the KFLOP/KSTEP +5V supply you must also make a GND connection to JP33 Pin5.  But then of course the analog output will not be isolated.  To have an isolated analog signal use a separate, isolated, supply with the + connected to pin 5 and the - connected to pin 7.  Or maybe your Spindle has a supply available?

Otherwise include a picture of your scope trace. 

HTH
Regards
TK





From: "bwholt@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: DynoMotion@yahoogroups.com
Sent: Tuesday, July 1, 2014 8:28 AM
Subject: [DynoMotion] KFLOP / KSTEP / MACH3 with PWM Spindle [7 Attachments]

 
[Attachment(s) from bwholt@... [DynoMotion] included below]
Hello,

I'm having a bit of an issue getting my PWM controlled spindle to work properly.  I'm using KFLOP in conjunction with KSTEP boards and running MACH3.  I've attached screenshots of my setup in MACH3 and of the spindle and PWM controller I'm using.

My issue is that I can get a scaled voltage in the range of 0 to 5 VDC out of the PWM generator; however, the waveform looks nothing like a standard PWM waveform.  It almost looks sinusoidal.  The frequency of the waveform is correct per the setup in the example spindle file C:\KMotion432\C Programs\KStep\Mach3\SpindleMach3KStep.c.

I'm using KSTEP JP33 pin 6 as the PWM output.  I've connected an oscilloscope across pin 6 and pin 7 while supplying 5 VDC to pin 5.I can set a spindle speed in MACH3 and the voltage across pin 6-7 will scale accordingly.  Is the waveform supposed to be quasi-sinusoidal?  Have I configured my pins correctly?

BTW, I've also verified ground and signal isolation.

Any insight would be much appreciated.

Thanks
Wayne


Group: DynoMotion Message: 9762 From: bwholt@bellsouth.net Date: 7/1/2014
Subject: Re: KFLOP / KSTEP / MACH3 with PWM Spindle
Hey Tom,

Thanks for the reply.  I guess what I meant by my comment about ground isolation is that the analog ground on pin 7 does not seem to be connected to the KSTEP/KFLOP/POWER SUPPLY ground.  If I understand your reply though, that seems normal.  One thing I think I may be doing wrong is that I am using the 5 volt supply from KFLOP JP4 pin 1 into the KSTEP JP33 pin 5.  Am I defeating the isolation when I do this?

I do have a separate 48 volt power supply to drive my spindle.  Would you suggest siphoning off 5 volts from this supply into JP33 pin 5 or can I use the 5 volt tap from the PC power supply I'm using to drive everything else?

Thanks

Wayne
Group: DynoMotion Message: 9763 From: TK Date: 7/1/2014
Subject: Re: KFLOP / KSTEP / MACH3 with PWM Spindle
Hi Wayne,

Yes the analog circuit is intentionally completely isolated from everything.  If you use the same supply as KFLOP or your PC you will defeat the isolation.  Use a separate 5V supply. I don't think it would be easy to derive it from your 48V supply. 

Regards
TK

On Jul 1, 2014, at 10:55 AM, "bwholt@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:

 

Hey Tom,


Thanks for the reply.  I guess what I meant by my comment about ground isolation is that the analog ground on pin 7 does not seem to be connected to the KSTEP/KFLOP/POWER SUPPLY ground.  If I understand your reply though, that seems normal.  One thing I think I may be doing wrong is that I am using the 5 volt supply from KFLOP JP4 pin 1 into the KSTEP JP33 pin 5.  Am I defeating the isolation when I do this?

I do have a separate 48 volt power supply to drive my spindle.  Would you suggest siphoning off 5 volts from this supply into JP33 pin 5 or can I use the 5 volt tap from the PC power supply I'm using to drive everything else?

Thanks

Wayne

Group: DynoMotion Message: 9767 From: bwholt@bellsouth.net Date: 7/2/2014
Subject: Re: KFLOP / KSTEP / MACH3 with PWM Spindle
Hey Tom,

Thanks for the prior help.  I now have what I think is a totally isolated 5 volt supply for the PWM circuitry; however, the spindle is still not behaving correctly.  When I command any speed in MACH3, the spindle will spin up briefly and then stop.  Here's some more data:

  • Spindle motor is rated at a max speed of 12,000 rpm
  • Spindle pulley setup in MACH3 is set accordingly, Min speed of zero, Max speed of 12,000 and a ratio of 1
  • The PWM circuitry will output a scaled DC voltage based on my chosen speed; however, there's caveats:
    • If I measure the voltage across JP33 pins 6 & 7 with them unconnected to my spindle PWM controller, I will get ~5 volts at the max speed of 12,000 rpm.
    • If I measure the voltage across the same pins with them connected to my PWM controller, the voltage drops to ~2.7 volts.
  • The main spindle power supply is a separate 48 volt switching power supply that is not connected to anything else.
  • The PWM control power does come from my ATX power supply that runs everything else; HOWEVER, I'm taking 12 volts and isolating it with an optical isolator as shown in the attached picture.  I'm then stepping down from 12 volt to 5 volts with a UBEC that I typically use on my RC aircraft projects (also attached picture).
  • The +5 volts from the UBEC is connected to JP33 pin 5 while the ground from the UBEC is attached to JP33 pin 7 AND the PWM ground pin on my spindle controller.  The PWM output at JP33 pin 6 is of course connected to the positive PWM pin on the spindle controller.
  • The spindle control code I'm using is the example file at C:\KMotion432\C Programs\KStep\Mach3\SpindleMach3Kstep.c
Any thoughts on this?  Is the PWM circuit behaving correctly?  Is my spindle controller toast?

Thanks

Wayne
  @@attachment@@
Group: DynoMotion Message: 9768 From: Tom Kerekes Date: 7/2/2014
Subject: Re: KFLOP / KSTEP / MACH3 with PWM Spindle [2 Attachments]
Hi Wayne,

I didn't see that you included any link to the spindle specification.  I Googled and found:


Quote:
PWM input : level 3.5-12V VPP,
Frequency :1K-10KHZ(Particularly suitable for MCH3 spindle speed control.

So I think you have a miss understanding.  I believe it expects a 3.5V Digital PWM signal itself.  Not an analog 0-5V signal.

KFLOP's digital PWM outputs are 3.3V LVTTL signals and are not guaranteed to be more than 2.8V.  To get a PWM signal above 3.5V will require a buffer circuit.  

If you do some research and find the input specification we may be able to help you.

KFLOP





From: "bwholt@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: DynoMotion@yahoogroups.com
Sent: Wednesday, July 2, 2014 4:53 PM
Subject: Re: [DynoMotion] Re: KFLOP / KSTEP / MACH3 with PWM Spindle [2 Attachments]

 
[Attachment(s) from bwholt@... [DynoMotion] included below]
Hey Tom,

Thanks for the prior help.  I now have what I think is a totally isolated 5 volt supply for the PWM circuitry; however, the spindle is still not behaving correctly.  When I command any speed in MACH3, the spindle will spin up briefly and then stop.  Here's some more data:

  • Spindle motor is rated at a max speed of 12,000 rpm
  • Spindle pulley setup in MACH3 is set accordingly, Min speed of zero, Max speed of 12,000 and a ratio of 1
  • The PWM circuitry will output a scaled DC voltage based on my chosen speed; however, there's caveats:
  • If I measure the voltage across JP33 pins 6 & 7 with them unconnected to my spindle PWM controller, I will get ~5 volts at the max speed of 12,000 rpm.
  • If I measure the voltage across the same pins with them connected to my PWM controller, the voltage drops to ~2.7 volts.
  • The main spindle power supply is a separate 48 volt switching power supply that is not connected to anything else.
  • The PWM control power does come from my ATX power supply that runs everything else; HOWEVER, I'm taking 12 volts and isolating it with an optical isolator as shown in the attached picture.  I'm then stepping down from 12 volt to 5 volts with a UBEC that I typically use on my RC aircraft projects (also attached picture).
  • The +5 volts from the UBEC is connected to JP33 pin 5 while the ground from the UBEC is attached to JP33 pin 7 AND the PWM ground pin on my spindle controller.  The PWM output at JP33 pin 6 is of course connected to the positive PWM pin on the spindle controller.
  • The spindle control code I'm using is the example file at C:\KMotion432\C Programs\KStep\Mach3\SpindleMach3Kstep.c
Any thoughts on this?  Is the PWM circuit behaving correctly?  Is my spindle controller toast?

Thanks

Wayne


Group: DynoMotion Message: 9769 From: bwholt@bellsouth.net Date: 7/2/2014
Subject: Re: KFLOP / KSTEP / MACH3 with PWM Spindle
Tom,

Yep.....this is what I've kinda suspected all along but I just figured since this controller said it was suited for Mach3 that the KSTEP/KFLOP boards would have provided it the correct signal.  Unfortunately, I have not been able to find any more data than you have on that particular controller.  In fact, others have posted in various places asking if anyone has run across more data.  Everyone I've read says no.  That's pretty typical for Chinese components though.

Do you have any suggestions for a controller that will accept the voltage signal output from KSTEP as-is?  The motor specs are as you've already discovered off of the Amazon page.  Or....should I try to rig up some circuit that takes either the KFLOP or KSTEP signal and converts it to what my controller needs?  I bet I can take an Arduino board and write some code to read the KSTEP signal and output a corresponding PWM signal.....or am I dreaming?

Wayne
Group: DynoMotion Message: 9770 From: Tom Kerekes Date: 7/3/2014
Subject: Re: KFLOP / KSTEP / MACH3 with PWM Spindle
Hi Wayne,

Well you should have some additional information or how is it that you wired it?  Can you see if the board has an opto coupler on it?  I'm guessing that is the input circuit.  Are there 2 isolated pins for the input?

I'm thinking the simplest, safest thing would be to use an opto coupler ourselves that the ~2.8V coming out of the KFLOP PWM could use to switch +5V to the motor control PWM input.

Regards
TK